# @Time    :2025/3/26 9:20
# for i in range(2,4):
#     for j in range(2,i):
#         print("*"*i)
#     print("*"*i)
"""
打印两行三列的星星
"""
print("====================")

# 外层控制行数，内层控制列

# def print_star():
#     num = 2
#     while num > 0:
#         print("*" * 3)
#         num -= 1
#
#
# print_star()
# print("-----")
# print_star()
# ---------------------------------------------------------
# str=list[1,2,3]
# print(type(str),str)


# -----------------抽取函数（加参数）--向控制台打印*------------------
# def print_star(rows, cols):
#     while rows > 0:
#         print("*" * cols)
#         rows -= 1
#
#
# print_star(2, 3)
# print("-----")
# print_star(1, 6)


# print("###########双for##正等腰############")
# n = 5
# for i in range(1, n + 1):
#     for c in range(0, n - i):
#         print(" ", end="")  # 打印不换行
#     print("*" * (i * 2 - 1))
# print("############单for#正等腰############")
# n = 5
# for i in range(1, n + 1):
#     print(" " * (n - i) + "*" * (i * 2 - 1))
# print("############单for#倒等腰############")
# n = 5
# for i in range(n, 0, -1):
#     print(" " * (n - i) + "*" * (i * 2 - 1))

print("-----------------------------")
n = 5
for i in range(n, 0, -1):  # 管的是行数有几行
    for j in range(0, n - i):  # 管的是每列有有几个
        print(" ", end="")
    print("*" * (i * 2 - 1))# 管的是每行有几个
